package com.hyt.it.ogt.kq.service.gov.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hyt.core.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 考生编排信息表
 * </p>
 *
 * @author huangyh
 * @since 2021-04-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("kw_time_room_candidate")
@ApiModel(value="KwTimeRoomCandidate对象", description="考生编排信息表")
public class TimeRoomCandidate extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "考生id")
    private String candidateId;

    @ApiModelProperty(value = "考试任务id")
    private String taskId;

    @ApiModelProperty(value = "场次id")
    private String timeRoomId;

    @ApiModelProperty(value = "批次id")
    private String timeId;

    @ApiModelProperty(value = "批次id")
    private String placeId;

    @ApiModelProperty(value = "考场id")
    private String roomId;

    @ApiModelProperty(value = "科目id")
    private String subjectId;

    @ApiModelProperty(value = "考生科目id")
    @TableField("candidate_subject_id")
    private String candidateSubjectId;

    @ApiModelProperty(value = "座位号")
    private String seatNum;

    @ApiModelProperty(value = "准考证号")
    private String admissionNum;

    @ApiModelProperty(value = "自增排序")
    private Integer increaseIndex;
    
    
    public static String getTimeRoomCandidateCacheKey(String taskId, String timeId, String admissioonNum) {
    	StringBuilder sb = new StringBuilder();
    	sb.append("KW_GOV_TC");
    	sb.append(":");
    	sb.append(taskId);
    	sb.append(":");
    	sb.append(timeId);
    	sb.append(":");
    	sb.append(admissioonNum);
		return sb.toString();
    }
}
